#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
#=============================================================================
#     FileName: thriftServer.py
#         Desc: test thriftpy
#      License: GPL
#       Author: Steve Lemuel
#        Email: wlemuel@hotmail.com
#      Version: 0.0.1
#   LastChange: 2015-09-06 14:49:17
#    CreatedAt: 2015-09-06 14:49:17
#=============================================================================
"""

import thriftpy
pingpong_thrift = thriftpy.load("thrift/pingpong.thrift",
                                module_name="pingpong_thrift")

from thriftpy.rpc import make_server


class Dispatcher(object):
    def ping(self):
        return "pong"


server = make_server(pingpong_thrift.PingPong, Dispatcher(), '0.0.0.0', 6000)
server.serve()
